
public class LinearSerach {
		
		public static void main(String[] args) {
			
			int [] array1;
			array1 = new int[10];
			
			array1[0] = 2;
			array1[1] = 5;
			array1[2] = 45;
			
			
			int[] array2 = new int[10];
			array2[0] = 2;
			array2[1] = 5;
			array2[2] = 45;
			
			
//			for(int i=0;i<array1.length;i++)
//			{
//				System.out.println(array1[i]);
//			}
			String[] students = {"mahi", "debashis", "adnan", "hari"};
			
	
			
			int[] array3 = {2,3,45,4,5,6,7,8,9};
			String inputStr = args[0];
			int input = Integer.parseInt(inputStr);
			
			boolean isNumberExists = false;
			for(int i=0; i< array3.length;i++){
				System.out.println(i+1);
				if(input == array3[i])
				{
					isNumberExists = true;
					break;
				}
			}
			
			if(isNumberExists == true)
			{
				System.out.println(input + " Number exists" );
			}else{
				System.out.println(input + " Number does not exists" );
			}
			
			
			for(int i=0; i< array3.length;i++){
					if(array3[i] != input)
					{
						continue;
					}
					System.out.println("Number exists");
					int k=0;
					if(k==1)
					{
						
					}
			}
			
			
			
		
			
			
			
			
			//try catch finally
			
			try{
				
				
				for(int i=0; i<= array3.length;i++){
					System.out.println(array3[i]);
				}
				
				//create a connection
				
				//executing db calls
				
			 return;
					
			}
			
			catch(ArrayIndexOutOfBoundsException e)
			{
				System.out.println("  ArrayIndexOutOfBoundsException Exception came");
				
				

			}
			catch(RuntimeException e)
			{
				System.out.println("Runtime Exception came");
				
				

			}
			catch(Exception e)
			{
				System.out.println("Exception came");
				

			}
			
			finally{
				//close connection
			}
			
			
			for(int i=0; i< array3.length;i++){
				if(array3[i] != input)
				{
					continue;
				}
				
				
				
			
				
				
				///break, continue, try catch finally, return
				
				
				
				
		}
			
		}
		
		
		
		

		public String test(int i)
		{
			if(i==1){
				System.out.println("i==1");
				return  "Yes";
			}
			if(i==2)
			{
				
			}
			for(int i1=0; i1<100 ;i1++)
			{
				System.out.println("hi");
			}
			return "No";
			
		}
		
		
		
}
